﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyTest.Logger {

    public class LoggingEngine {

        private ILogger logger;

        public LoggingEngine() {
            this.logger = new ConsoleLogger(); //Default console 
        }

        public LoggingEngine(ILogger logger) {
            this.logger = logger; //Inject a different logger
        }

        public void Log(string message) {
            this.logger.OpenLog();
            this.logger.Log(message);
            this.logger.CloseLog();
        }
    }

}
